extern crate unmp_id;

use unmp_id::*;

#[test]
fn test_un() {
    let id0 = UniqueId::new(0, 0);
    let id0_raw = id0.id();
    assert_eq!(id0_raw.len(), 2);
    let id1 = UniqueId::new(1, 1);
    let id1_raw = id1.id();
    assert_eq!(id1_raw.len(), 4);

    let id0_tmp = UniqueId::try_from(&id0_raw).unwrap();
    assert_eq!(id0, id0_tmp);
    let id1_tmp = UniqueId::try_from(&id1_raw).unwrap();
    assert_eq!(id1, id1_tmp);
}
